home *** CD-ROM | disk | FTP | other *** search
/ EnigmA Amiga Run 1999 March / EnigmA AMIGA RUN 35 (1999)(G.R. Edizioni)(IT)[!][issue 1999-03].iso / earcd / devel / vbcc-68k-src / machines / amiga68k / libsrc / amigalib / makealib.script < prev    next >
AmigaDOS Script File  |  1999-01-01  |  3KB  |  104 lines

  1. .key -sd/S
  2.  
  3. if not exists MakeALIB.script
  4.   echo "Please change first to the script's directory!"
  5.   quit
  6. endif
  7.  
  8. if "<-sd>" EQ ""
  9.   set lbmodel large data
  10.   set alibnam amiga.lib
  11.   set fdflags ""
  12.   set vcflags ""
  13. else
  14.   set lbmodel small data
  15.   set alibnam amigas.lib
  16.   set fdflags -sd
  17.   set vcflags -sd
  18. endif
  19.  
  20. echo "Checking for required commands. Stopping if missing.*N"
  21.  
  22. failat 5
  23.   echo noline "which    : "
  24.     which which            ;stop if missing. :-)
  25.   echo noline "copy     : "
  26.     which copy
  27.   echo noline "delete   : "
  28.     which delete
  29.   echo noline "execute  : "
  30.     which execute
  31.   echo noline "join     : "
  32.     which join
  33.   echo noline "list     : "
  34.     which list
  35.   echo noline "fd2lib   : "
  36.     which fd2lib
  37.   echo noline "vc       : "
  38.     which vc
  39. failat 20
  40.  
  41. echo "*NCompiling $alibnam with $lbmodel model. This may take some time..."
  42.  
  43. echo "*NCleaning T:..."
  44.   delete t:($alibnam|#?.(s|o|dir)) quiet >nil:
  45.  
  46. echo "*NProcessing FDs..."    ; cia_lib.fd klappt nicht, da keine Base angegeben (?)
  47.  
  48.   list   >t:mkfds lformat="fd2lib $fdflags -of *"Creating %%cs...*" -o t: %s%s" fd:(a(migaguide|sl)|b(att(clock|mem)|ullet)|c(ardres|o(lorwheel|mmodities|nsole)))#?.fd
  49.   list  >>t:mkfds lformat="fd2lib $fdflags -of *"Creating %%cs...*" -o t: %s%s" fd:(d(atatypes|isk(font|%)|os|tclass)|ex(ec|pansion)|g(adtools|raphics))#?.fd
  50.   list  >>t:mkfds lformat="fd2lib $fdflags -of *"Creating %%cs...*" -o t: %s%s" fd:(i(con|ffparse|n(put|tuition))|keymap|l(ayers|o(cale|wlevel)))#?.fd
  51.   list  >>t:mkfds lformat="fd2lib $fdflags -of *"Creating %%cs...*" -o t: %s%s" fd:(m(ath(ffp|ieee(doub(bas|trans)|sing(bas|trans))|trans)|isc))#?.fd
  52.   list  >>t:mkfds lformat="fd2lib $fdflags -of *"Creating %%cs...*" -o t: %s%s" fd:(nonvolatile|potgo|r(amdrive|e(altime|xxsyslib))|t(imer|ranslator)|utility|wb)#?.fd
  53.  
  54.   execute t:mkfds
  55.   delete  t:mkfds quiet
  56.  
  57. echo "*NAssembling stubs..."
  58.   vc $vcflags -c t:#?.s
  59.  
  60. echo "*NRemoving obsolete assembler sources..."
  61.   delete t:#?.s quiet
  62.  
  63.   ;list >t:MakeALIB.batch t:#?.o LFORMAT "libr -a t:$alibnam *"%s%s*""
  64.   ;execute t:MakeALIB.batch
  65.   ;delete t:MakeALIB.batch quiet
  66.  
  67. echo "*NCompiling/Assembling support routines..."
  68.   vc $vcflags -c #?.(c|s)
  69.  
  70. echo "*NJoining everything together..."
  71.   join #?.o t:#?.o to t:$alibnam
  72.  
  73. echo "*NCleaning up..."
  74.   delete t:#?.o quiet
  75.  
  76. unset vcflags
  77. unset fdflags
  78. unset lbmodel
  79.  
  80. set instto T:
  81.  
  82. which >nil: ask
  83. if not warn
  84.   ask "*NInstall $alibnam to vlib: (y/n)?"
  85.   if warn
  86.     set instto vlib:
  87.     failat 21
  88.     copy >nil: t:$alibnam $instto
  89.     if not fail
  90.       delete t:$alibnam quiet
  91.     endif
  92.     failat 20
  93.   endif
  94. endif
  95.  
  96. if exists ${instto}${alibnam}
  97.   echo "*N*N...poooh... $alibnam can be found in ${instto}."
  98. else
  99.   echo "*N*NInstallation error!"
  100. endif
  101.  
  102. unset instto
  103. unset alibnam
  104.